package com.zhangzhan.gulimallorder.feign;

import com.zhangzhan.gulimallcommcon.tos.SkuCheckInventoryTo;
import com.zhangzhan.gulimallcommcon.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author 张一恒
 * @version 1.0
 * @description:
 * @date 2024/7/1 4:18
 */
@FeignClient("gulimall-ware")
public interface WareFeignService {

    @RequestMapping(value = "/gulimallware/waresku/check/inventory",method = RequestMethod.POST)
    //@RequiresPermissions("gulimallware:waresku:list")
    public List<SkuCheckInventoryTo> checkInventory(@RequestBody List<Long> skuIds);

    @RequestMapping(value = "/gulimallware/waresku/lockInventory", method = RequestMethod.POST)
    //@RequiresPermissions("gulimallware:waresku:list")
    public R lockInventory(@RequestBody Map<Long, Integer> map, @RequestParam("orderSn") String orderSn);
}
